package socketmvc.server.biz;

import com.alibaba.fastjson.JSONObject;
import socketmvc.server.context.SocketChannel;

public class ImRequest {

    private final SocketChannel context;

    private final JSONObject data;

    public ImRequest(SocketChannel context, JSONObject data) {
        this.context = context;
        this.data = data;
    }

    public JSONObject getData() {
        return data;
    }

    public String getCommand() {
        return data.getString("cmd");
    }

    public String getContextType() {
        return context.getType();
    }
}
